//
//  TitleLineView.swift
//  SCA
//
//  Created by tjun on 2025/9/5.
//

import UIKit
import SnapKit


class TitleLineView: UIView {

    let titleLabel = UILabel(font: UIFontSemiboldMake(14), textColor: .white)

    override init(frame: CGRect) {
        super.init(frame: frame)
        
        setSubView()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setSubView() {
        
        backgroundColor = AppStyle.color.background
        
        titleLabel.addTo(self)
        titleLabel.snp.makeConstraints { make in
            make.left.equalTo(0)
            make.top.equalToSuperview()
            make.bottom.equalToSuperview()
        }

        let lineView = UIView().addTo(self)
        lineView.backgroundColor = UIColorMake(0xAFB2B7).withAlphaComponent(0.5)
        lineView.snp.makeConstraints { make in
            make.left.equalTo(titleLabel.snp.right).offset(20)
            make.right.equalToSuperview()
            make.centerY.equalToSuperview()
            make.height.equalTo(0.7)
        }
    }

}
